<meta charset="UTF-8">
  <div class="content-wrapper" style='height: 100%;'>
    <section class="content-header">
      <h1 style="text-align:center;margin: -5px 0px 5px 0px;">
        	套餐管理
      </h1>
    </section>
    <div style='background: transparent;width: 100%;height: 70%;display:flex;background-color: #ffffff;'>
    	
    	<div style='width: 30%;border: 1px solid #ccc;'>
    			<div style='width: 100%;height: calc( 100% - 50px );overflow: auto;'><!--background-color: #e4eaec;-->
    					<div id='package_{{package.id}}' ng-click='getGroups($event,package.id,package.is_enabled,package.is_fixed_package,package.name)' ng-repeat='package in packages' style='width: 100%;height: 50px;line-height: 50px;text-indent: 10%;border-bottom: 1px solid #ddd;'>
    						<span>{{package.name}}</span>
    						<span style='float:right;width: 80px;text-align: left;'>{{package.is_enabled == 1 ? '启用' : '停用'}}</span>
    					</div>
    			</div>
    			<div style='width: 100%;height: 50px;border-top: 1px solid #CCCCCC;padding: 10px;'>
    				<button ng-click='addPackage()' class="btn btn-primary pull-left" ><i class="fa fa-plus"></i>&nbsp;&nbsp;新增套餐</button>
    				<button style='margin-left: 2%;' class="btn btn-info" ng-click="updatePackage()">修改</button>
          	<button style='margin-left: 2%;' class="btn btn-warning" ng-click="enablePackage()" ng-show='is_enabled'>停用</button>
          	<button style='margin-left: 2%;' class="btn btn-success" ng-click="disablePackage()" ng-hide='is_enabled'>启用</button>
          	<button style='margin-left: 2%;' class="btn btn-danger" ng-click="delPackage()">删除</button>
    			</div>
    	</div>
    	<div style='width: 30%;border: 1px solid #ccc;border-left: none;'>
    			<div style='width: 100%;height: calc( 100% - 50px );overflow: auto;'>
    					<div ng-click='getGroup_details($event,group.id,group.name,group.available_choose_count)' ng-repeat='group in groups' style='position: relative;width: 100%;height: 40px;line-height: 40px;text-indent: 10%;border-bottom: 1px solid #ddd;'>
    						<span>{{group.name}}</span>
    						<span style='position: absolute;top: 0px;right: 20px;' ng-hide='is_fixed_package'>可选数量：&nbsp;&nbsp;&nbsp;{{group.available_choose_count}}</span>
    					</div>
    			</div>
    			<div style='width: 100%;height: 50px;border-top: 1px solid #CCCCCC;padding: 10px;'>
    				<button ng-click='addGroups()' class="btn btn-primary pull-left" ><i class="fa fa-plus"></i>&nbsp;&nbsp;新增分组</button>
    				<button ng-click='updateGroups()' style='margin-left: 2%;' class="btn btn-info" ng-click="showwin_edit(w.id)">修改</button>
          	<button ng-click='delGroup()' style='margin-left: 2%;' class="btn btn-danger" ng-click="showwin_del(w.id)">删除</button>
    			</div>
    	</div>
    	<div style='width: 40%;border: 1px solid #ccc;border-left: none;'>
    			<div style='width: 100%;height: calc( 100% - 50px );overflow: auto;'>
	    				 <table ng-show='is_fixed_package' id='fixedTable' style='width: 100%;position: relative; display: block;'  class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
			                <thead style='width: 100%;background: #ffffff;'>
				                <tr role="row">
				                <!--	<th    style="width: 10%;">菜品编码</th>-->
				                	<th    style="width: 10%;">菜品名称</th>
				                	<th    style="width: 10%;">数量</th>
				                	<th    style="width: 10%;">操作</th>
				                </tr>
			                </thead>
			              <tbody id='dataList' style='width: 100%;'>
					                <tr  style='position: relative;width: 100%;' ng-class="{even:!$even, odd:!$odd}" ng-repeat="detail in Group_details">
						                 <!--<td style="width: 10%;">
							                 		{{detail.item_code}}
						                 </td>-->
						                 <td style="width: 10%;">{{detail.item_name}}</td>
						                   <td style="width: 10%;">{{detail.count}}</td>
						                  <td style="width: 10%;">
						                  	<a href=""  class="btn btn-lg del" style="padding:0px" title="删除" ng-click="dish_del(detail.item_id,detail.item_name)"><i class="fa  fa-close"></i></a>
						                  </td>
					                </tr>
			                </tbody>
		                <tfoot>
		                </tfoot>
	             	  </table>
	             	   <table ng-hide='is_fixed_package' id='randomTable' style='width: 100%;position: relative; display: block;'  class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
			                <thead style='width: 100%;background: #ffffff;'>
				                <tr role="row">
				                <!--	<th    style="width: 10%;">菜品编码</th>-->
				                	<th    style="width: 10%;">菜品名称</th>
				                	<!--<th    style="width: 10%;">数量</th>-->
				                	<th    style="width: 10%;">操作</th>
				                </tr>
			                </thead>
			              <tbody id='dataList' style='width: 100%;'>
					                <tr  style='position: relative;width: 100%;' ng-class="{even:!$even, odd:!$odd}" ng-repeat="detail in Group_details">
						                 <!--<td style="width: 10%;">
						                 	{{detail.item_code}}
						                 </td>-->
						                 <td style="width: 10%;">{{detail.item_name}}</td>
						                   <!--<td style="width: 10%;">{{detail.count}}</td>-->
						                  <td style="width: 10%;">
						                  	<a href=""  class="btn btn-lg del" style="padding:0px" title="删除" ng-click="dish_del(detail.item_id,detail.item_name)"><i class="fa  fa-close"></i></a>
						                  </td>
					                </tr>
			                </tbody>
		                <tfoot>
		                </tfoot>
	             	  </table>
	             	  
    			</div>
    			<div style='width: 100%;height: 50px;border-top: 1px solid #CCCCCC;padding: 10px;'>
    				<button ng-click='openDishSelect()' class="btn btn-primary pull-left" ><i class="fa fa-plus"></i>&nbsp;&nbsp;套餐菜品编辑</button>
    			</div>
    	</div>
    	
    		<!--<div style='position: absolute;width: 20%;height: 100%;border: 1px solid #ccc;left: 1%;overflow: auto;'>
    				<div style='width: 100%;height: 50px;border-bottom: 1px solid #ccc;font-size: 16px;'>
    						<span style='margin: 12px 0px 0px 2%;display: inline-block;width: 32%;cursor: pointer;font-size: 14px;' >全部套餐</span>
    						<button style='margin: 12px 1%;padding: 2px 6px;background-color: #f05050;font-size: 12px;width:20%;max-width: 40px;' class="btn pull-right" ng-click='delPackage()'>删除</button>
								<button style='margin: 12px 1%;padding: 2px 6px;background-color: #3c8dbc;font-size: 12px;width:20%;max-width: 40px;' class="btn pull-right" ng-click='updatePackage()'>修改</button>
								<button style='margin: 12px 1%;padding: 2px 6px;background-color: #3c8dbc;font-size: 12px;width:20%;max-width: 40px;' class="btn pull-right" ng-click='addPackage()'>新增</button>
    				</div>
    				<div ng-class="{even:!$even, odd:!$odd}"  ng-repeat='c in classify' ng-click='choicePackage($event,c.id,c.name)'
    					style='position: relative;height: 40px;width: 100%;padding: 0px 0px 0px 14px;font-size: 18px;cursor: pointer;line-height: 40px;'>{{c.name}}</div>
    		</div>
    		<div style='position: absolute;width: 78%;height: 100%;border: 1px solid #ccc;right: 1%;overflow: auto;'>
    								
										<button style='margin: 12px 1%;padding: 4px 12px;' class="btn pull-right" ng-click="download('dishTable','套餐信息_',packageName)"><i class="fa fa-cloud-download"></i>&nbsp;&nbsp;导出</button>
										<button style='margin: 12px 1%;padding: 4px 12px;background-color: #3c8dbc;' class="btn pull-right" ng-click='pockageEdit($event)'>编辑</button>
					              <div  class="dataTables_wrapper form-inline dt-bootstrap " style='height: 100%;width: 98%;'>
					              	<div class="row">
						              	<div class="col-sm-12">
							              	<table id='dishTable' style='width: 100%; position: relative;height:90%; display: block;' id="example1" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
								                <thead style='display: inline-table;width: 100%;background: #ffffff;'>
									                <tr role="row">
									                	<th    style="width: 12%;">菜品名称</th>
									                	<th   style="width: 9%;">所属套餐</th>
									                	<th   style="width: 9%;">售卖窗口</th>
									                </tr>
								                </thead>
								              <tbody id='dataList' style='display: inline-table;width: 100%;'>
										                <tr ng-click="itemSelected($event)" style='position: relative;width: 100%;display: inline-table;' ng-class="{even:!$even, odd:!$odd}" ng-repeat="dish in packageDishes">
											                  <td style="width: 12%;display: none;">{{dish.id}}</td>
											                  <td style="width: 12%;">{{dish.dish_name	}}</td>
															  				<td style="width: 9%;" >{{dish.package_name}}</td>
														  					<td style="width: 9%;" >{{dish.window_name}}</td>
									  									
										                </tr>
								                </tbody>
							                <tfoot>
							                </tfoot>
						             	  </table>
					              	</div>
				              	</div> 
				            	</div>
    		</div>-->
    		 
    </div> 
</div>
<!-- 套餐编辑modal -->
<div class="modal fade" id="packageEdit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document" style='margin: 100px auto;width: 80%;height: 70%;'>
    <div class="modal-content" style='height: 90%;'>
      <div class="modal-header" style='border-bottom: none;'>
        <!--button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>-->
        <h4 class="modal-title" style="text-align:center" >套餐编辑</h4>
      </div>
     <!--表格-->
			<div class="box" style='width: 96%;height: 76%;margin: 0px 2%;display: inline-block;display: flex;font-size: 16px;'>
					<div style='width: 20%; border-right: 1px solid #d2d6de;height: 100%;'>
						<div ng-click='clickAllCategory()' style='cursor:pointer;width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;line-height: 40px;text-align: center;font-size: larger;'>全部分类</div>
						<div style='width: 100%;height: calc(100% - 40px);overflow: auto;'>
							<div ng-click='clickCategory($event,m.id)' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;line-height: 40px;text-indent: 20px;cursor: pointer;' ng-repeat="m in categorys">{{m.name}}</div>
						</div>
					</div>
					<div style='width: 30%;height: 100%;'>
							<div style='width: 80%;height: 90%;border: 1px solid #CCCCCC;border-radius: 4px;margin: 5% 10%;overflow: auto;'>
									<div ng-click='moveDish($event,data.id)' style='border-radius: 3px;padding: 5px 10px;background-color: #3c8dbc;color: #FFFFFF;margin: 5px;' ng-repeat='data in currentData track by $index'>{{data.name}}</div>
							</div>
					</div>	
					<div style='width: 20%;height: 100%;position: relative;'>
							<div style='text-align: center;height: 50%;width: 100%;margin: 25% 0px 25% 0px;'>>>>>>>>>>>>>>></div>
							<div style='text-align: center;'><<<<<<<<<<<<<<</div>
					</div>	
					<div style='width: 30%;height: 100%;'>
						  <div style='width: 80%;height: 90%;border: 1px solid #CCCCCC;border-radius: 4px;margin: 5% 10%;overflow: auto;'>
									<div ng-click='removeDish($event,data.id)' style='border-radius: 3px;padding: 5px 10px;background-color: #3c8dbc;color: #FFFFFF;margin: 5px;' ng-repeat='data in dishesChoiced track by $index'>{{data.name}}</div>
							</div>
					</div>
	    </div>
      <div class="modal-footer" style='border-top: none;'>
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="material_true()">确定</button><!--ng-click="material_true()"-->
      </div>
    </div>
  </div>
</div>
<!-- 新增套餐 -->
<div class="modal fade" id="addPackage" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">新增套餐</h4>
      </div>
      <from>
      <div class="modal-body form-horizontal">
        <div class="box-body">
        			<!--<div class='row1'>
	    					<label style=''>套餐编码</label>
	    					<input id="packageNo" type="text" ng-model='packageNo' >
	    				</div>-->
	    				<div class='row1'>
	    					<label style=''>套餐条码</label>
	    					<input id="packageCode" type="text" ng-model='packageCode' >
	    				</div>
	    				<div class='row1'>
	    					<label style='flex: 0 0 112px;'>套餐归属分类</label>
	    					<select  ng-model='categoryId' ng-options='category.id as category.name for category in categorys'></select>
	    				</div>
	    				<div class='row1'>
	    					<label style=''>套餐名称</label>
	    					<input id="packageName" type="text" ng-model='packageName' ng-keyup='getPingyin(packageName)'>
	    				</div>
	    					<div class='row1'>
		    					<label style='margin-left: 12px;'>套餐助记码</label>
		    					<input id="shortName" type="text" ng-model='shortName' >
		    				</div>
		    				<div class='row1'>
		    					<label style=''>套餐价格</label>
		    					<input id="packagePrice" type="number" ng-model='packagePrice' >
		    				</div>
		    				<div class='row1'>
		    					<label style='flex: 0 0 125px;'>是否为快捷菜品</label>
		    					 <div class="col-sm-9">
		                            <input class='tgl tgl-flat' id='quickDish' type='checkbox' ng-model="quickDish">
		    													<label class='tgl-btn' for='quickDish'></label>
		                        </div>
		    				</div>
		    				<div class='row1'>
		    					<label style='flex: 0 0 125px;'>是否为固定套餐</label>
		    					 <div class="col-sm-9">
		                            <input class='tgl tgl-flat' id='is_fixed_package' type='checkbox' ng-model="is_fixed_package">
		    													<label class='tgl-btn' for='is_fixed_package'></label>
		                        </div>
		    				</div>
	           	 <div class='row1'>
	    					<label style=''>制作档口</label>
	    					<select  ng-model='window' ng-options='win.id as win.name for win in windows'></select>
	    				</div>
	    				<div class='row1'>
	    					<label style=''>制作厨师</label>
	    					<select  ng-model='chief' ng-options='chief.id as chief.name for chief in chiefs'></select>
	    				</div>
	    				<div class='row1' style='height: 90px;'>
	    					<label >套餐描述</label>
	    					<textarea id="description"  ng-model='description'></textarea>
	    				</div>
	    			
         </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="submit" class="btn btn-success btn-lg" ng-click="addPackage_true();">确定</button>
      </div>
      </from>
    </div>
  </div>
</div>
<!-- 修改套餐 -->
<div class="modal fade" id="updatePackage" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">套餐修改</h4>
      </div>
      <from>
      <div class="modal-body form-horizontal">
        <div class="box-body">
        			<!--<div class='row1' style='background-color: #eee;'>
	    					<label style=''>套餐编码</label>
	    					<input id="up_packageNo" readonly type="text" ng-model='up_packageNo' style='background-color: #eee;'>
	    				</div>-->
	    				<div class='row1'>
	    					<label style=''>套餐条码</label>
	    					<input id="up_packageCode" type="text" ng-model='up_packageCode' >
	    				</div>
	    				<div class='row1'>
	    						<label style='flex: 0 0 112px;'>套餐归属分类</label>
	    					<select  ng-model='up_categoryId' ng-options='category.id as category.name for category in categorys'></select>
	    				</div>
	    				<div class='row1'>
	    					<label style=''>套餐名称</label>
	    					<input id="up_packageName" type="text" ng-model='up_packageName' ng-keyup='getPingyin_up(up_packageName)'>
	    				</div>
	    					<div class='row1'>
		    					<label style='margin-left: 12px;'>套餐助记码</label>
		    					<input id="up_shortName" type="text" ng-model='up_shortName' >
		    				</div>
		    				<div class='row1'>
		    					<label style=''>套餐价格</label>
		    					<input id="up_packagePrice" type="number" ng-model='up_packagePrice' >
		    				</div>
		    				<div class='row1'>
		    					<label style='flex: 0 0 125px;'>是否为快捷菜品</label>
		    					 <div class="col-sm-9">
		                            <input class='tgl tgl-flat' id='up_quickDish' type='checkbox' ng-model="up_quickDish">
		    													<label class='tgl-btn' for='up_quickDish'></label>
		                        </div>
		    				</div>
		    				<div class='row1'>
		    					<label style='flex: 0 0 125px;'>是否为固定套餐</label>
		    					 <div class="col-sm-9">
		                            <input class='tgl tgl-flat' id='up_is_fixed_package' type='checkbox' ng-model="up_is_fixed_package">
		    													<label class='tgl-btn' for='up_is_fixed_package'></label>
		                        </div>
		    				</div>
	           	 <div class='row1'>
	    					<label style=''>制作档口</label>
	    					<select  ng-model='up_window' ng-options='win.id as win.name for win in windows'></select>
	    				</div>
	    				<div class='row1'>
	    					<label style=''>制作厨师</label>
	    					<select  ng-model='up_chief' ng-options='chief.id as chief.name for chief in chiefs'></select>
	    				</div>
	    				<div class='row1' style='height: 90px;'>
	    					<label >套餐描述</label>
	    					<textarea id="up_description"  ng-model='up_description'></textarea>
	    				</div>
	    			
         </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="submit" class="btn btn-success btn-lg" ng-click="updatePackage_true();">确定</button>
      </div>
      </from>
    </div>
  </div>
</div>
<!-- 删除套餐 -->
  	<div class="modal fade" id="delPackage" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body">
           	确定要删除<span ng-bind="packageName"></span>吗？
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="del_Package(packageId);">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- 删除分组 -->
  	<div class="modal fade" id="delGroup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body">
           	确定要删除<span ng-bind="groupName"></span>吗？
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="del_Group(groupId);">确定</button>
      </div>
    </div>
  </div>
</div>
<!-- 模态框 固定套餐新增分组 -->
<div class="modal fade" id="addFixedGroup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">固定套餐新增分组</h4>
      </div>
      <from>
      <div class="modal-body form-horizontal">
        <div class="box-body">
           	  <div class="form-group">
	                <label for="inputEmail3" class="col-sm-2 control-label">分组名称</label>
	                <div class="col-sm-10">
	                    <input type="text" class="form-control" ng-model="fixedGroupName"  >
	                    <!--<span style="color: red;" ng-show="showIt"><i class="fa fa-close"></i>分组名称不能为空</span>-->
	                     <!--<input type="text" class="form-control" placeholder="类别名称" ng-model="categoryName" ng-required="true">-->
	                </div>
	            </div>
         </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="submit" class="btn btn-success btn-lg" ng-click="addFixed_true();">确定</button>
      </div>
      </from>
    </div>
  </div>
</div>
<!-- 模态框 随机套餐新增分组 -->
<div class="modal fade" id="addRandomGroup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">随机套餐新增分组</h4>
      </div>
      <from>
      <div class="modal-body form-horizontal"> 
        <div class="box-body">
           	  <div class="form-group">
	                <label for="inputEmail3" class="col-sm-2 control-label">分组名称</label>
	                <div class="col-sm-10">
	                    <input type="text" class="form-control" ng-model="randomGroupName"  >
	                    <!--<span style="color: red;" ng-show="showIt"><i class="fa fa-close"></i>分组名称不能为空</span>-->
	                     <!--<input type="text" class="form-control" placeholder="类别名称" ng-model="categoryName" ng-required="true">-->
	                </div>
	            </div>
	            <div class="form-group">
	                <label for="inputEmail3" class="col-sm-2 control-label">可选数量</label>
	                <div class="col-sm-10">
	                    <input type="number" class="form-control" ng-model="available_choose_count"  >
	                </div>
	            </div>
         </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="submit" class="btn btn-success btn-lg" ng-click="addRandom_true();">确定</button>
      </div>
      </from>
    </div>
  </div>
</div>
<!-- 模态框 固定套餐编辑分组 -->
<div class="modal fade" id="updateFixedGroup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">固定套餐分组编辑</h4>
      </div>
      <from>
      <div class="modal-body form-horizontal">
        <div class="box-body">
           	  <div class="form-group">
	                <label for="inputEmail3" class="col-sm-2 control-label">分组名称</label>
	                <div class="col-sm-10">
	                    <input type="text" class="form-control" ng-model="updatefixedGroupName"  >
	                    <!--<span style="color: red;" ng-show="showIt"><i class="fa fa-close"></i>分组名称不能为空</span>-->
	                     <!--<input type="text" class="form-control" placeholder="类别名称" ng-model="categoryName" ng-required="true">-->
	                </div>
	            </div>
         </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="submit" class="btn btn-success btn-lg" ng-click="updateFixed_true();">确定</button>
      </div>
      </from>
    </div>
  </div>
</div>
<!-- 模态框 随机套餐分组编辑 -->
<div class="modal fade" id="updateRandomGroup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">随机套餐分组编辑</h4>
      </div>
      <from>
      <div class="modal-body form-horizontal"> 
        <div class="box-body">
           	  <div class="form-group">
	                <label for="inputEmail3" class="col-sm-2 control-label">分组名称</label>
	                <div class="col-sm-10">
	                    <input type="text" class="form-control" ng-model="updaterandomGroupName"  >
	                    <!--<span style="color: red;" ng-show="showIt"><i class="fa fa-close"></i>分组名称不能为空</span>-->
	                     <!--<input type="text" class="form-control" placeholder="类别名称" ng-model="categoryName" ng-required="true">-->
	                </div>
	            </div>
	            <div class="form-group">
	                <label for="inputEmail3" class="col-sm-2 control-label">可选数量</label>
	                <div class="col-sm-10">
	                    <input type="number" class="form-control" ng-model="updateavailable_choose_count"  >
	                </div>
	            </div>
         </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="submit" class="btn btn-success btn-lg" ng-click="updateRandom_true();">确定</button>
      </div>
      </from>
    </div>
  </div>
</div>

<!-- 模态框 固定套餐选择菜品 -->
<div class="modal fade" id="choiceDishes" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document" style='width: 70%;'>
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">菜品选择</h4>
      </div>
      <from>
      <div class="modal-body form-horizontal"> 
				      		<div class="box" style='width: 96%;height: 400px;margin: 0px 2%;display: inline-block;display: flex;font-size: 16px;'>
								<div style='width: 15%; border: 1px solid #d2d6de;height: 100%;'>
									<div style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;line-height: 40px;text-indent: 20px;'>全部类别</div>
									<div style='width: 100%;height: calc(100% - 40px);overflow: auto;'>
										<div ng-click='getDishesByCategory(c.id)' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;line-height: 40px;text-indent: 20px;cursor: pointer;' ng-repeat='c in categorys'>{{c.name}}</div><!--ng-repeat="m in materialCategorys | unique: 'category_id' "-->
									</div>
								</div>
								<div style='width: 15%; border: 1px solid #d2d6de;height: 100%;'>
									<div style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;'>
										<input type="text" ng-model='cardInfor' class='goods' placeholder="菜品查询"/>
									</div>
									<div style='width: 100%;height: calc(100% - 40px);overflow: auto;'>
										<div ng-if='!m.is_package' ng-click='cmaterial($event,m.id,m.name,m.unit_name)' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;
											line-height: 40px;padding-left: 10%;cursor: pointer;' ng-repeat="m in dishesByOneCategory">
											<p style="display: inline-block;overflow: hidden;width: 70%;text-overflow: ellipsis;white-space: nowrap;">{{m.name}}</p>
											<span style="width: 20%;height: 100%;float: right;">
												<img src='../imgs/right.png' style='width: 20px;'/>
											</span>
										</div>
									</div>
								</div>
								<div style='width: 70%; border: 1px solid #d2d6de;height: 100%;'>
									<div style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;'>
										<div class='b_header' >菜品名称</div>
										<div class='b_header' >单位</div>
										<div class='b_header' >数量</div>
										<div class='b_header' >操作</div>
									</div>
									<div id='maDataList' style='width: 100%;height: calc(100% - 40px);overflow: auto;'>
										<div class='maDataList_div' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;' ng-repeat='m in maDatas' >
											<div class='b_header maDataList_name' >{{m.item_name}}</div>
											<div class='b_header' >{{m.unit_name}}</div>
											<div class='b_header' >
												<input type='number' ng-model='m.count' style='height: 28px; width: 90%;margin-left: 20px;text-indent: 20px;'/>
											</div>
											<div class='b_header' ><img ng-click='delThis($event,m.item_name)' src='../imgs/del.png' style='width: 15px;cursor: pointer;margin-left: 10px;'/></div>
										</div>
									</div>
								</div>
								
					      </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="submit" class="btn btn-success btn-lg" ng-click="addDish_true();">确定</button>
      </div>
      </from>
    </div>
  </div>
</div>

<!-- 模态框 随机套餐选择菜品 -->
<div class="modal fade" id="choiceDishesRandom" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document" style='width: 70%;'>
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">菜品选择</h4>
      </div>
      <from>
      <div class="modal-body form-horizontal"> 
				      		<div class="box" style='width: 96%;height: 400px;margin: 0px 2%;display: inline-block;display: flex;font-size: 16px;'>
								<div style='width: 15%; border: 1px solid #d2d6de;height: 100%;'>
									<div style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;line-height: 40px;text-indent: 20px;'>全部类别</div>
									<div style='width: 100%;height: calc(100% - 40px);overflow: auto;'>
										<div ng-click='getDishesByCategory(c.id)' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;line-height: 40px;text-indent: 20px;cursor: pointer;' ng-repeat='c in categorys'>{{c.name}}</div><!--ng-repeat="m in materialCategorys | unique: 'category_id' "-->
									</div>
								</div>
								<div style='width: 15%; border: 1px solid #d2d6de;height: 100%;'>
									<div style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;'>
										<input type="text" ng-model='cardInfor' class='goods' placeholder="菜品查询"/>
									</div>
									<div style='width: 100%;height: calc(100% - 40px);overflow: auto;'>
										<div ng-if='!m.is_package' ng-click='cmaterial($event,m.id,m.name,m.unit_name)' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;
											line-height: 40px;padding-left: 10%;cursor: pointer;' ng-repeat="m in dishesByOneCategory">
											<p style="display: inline-block;overflow: hidden;width: 70%;text-overflow: ellipsis;white-space: nowrap;">{{m.name}}</p>
											<span style="width: 20%;height: 100%;float: right;">
												<img src='../imgs/right.png' style='width: 20px;'/>
											</span>
										</div>
									</div>
								</div>
								<div style='width: 70%; border: 1px solid #d2d6de;height: 100%;'>
									<div style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;'>
										<div class='b_header' >菜品名称</div>
										<div class='b_header' >单位</div>
										<div class='b_header' >数量</div>
										<div class='b_header' >操作</div>
									</div>
									<div id='maDataList' style='width: 100%;height: calc(100% - 40px);overflow: auto;'>
										<div class='maDataList_div' style='width: 100%;height: 40px;border-bottom: 1px solid #d2d6de;' ng-repeat='m in maDatas' >
											<div class='b_header maDataList_name' >{{m.item_name}}</div>
											<div class='b_header' >{{m.unit_name}}</div>
											<!--<div class='b_header' >
												<input  ng-model='m.count' style='height: 28px; width: 90%;margin-left: 20px;text-indent: 20px;'/>
											</div>-->
											<div class='b_header' >{{m.count}}</div>
											<div class='b_header' ><img ng-click='delThis($event,m.item_name)' src='../imgs/del.png' style='width: 15px;cursor: pointer;margin-left: 10px;'/></div>
										</div>
									</div>
								</div>
								
					      </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="submit" class="btn btn-success btn-lg" ng-click="addDish_true();">确定</button>
      </div>
      </from>
    </div>
  </div>
</div>

<!-- 删除菜品 -->
  	<div class="modal fade" id="delDish" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" style="text-align:center">提示</h4>
      </div>
      <div class="modal-body form-horizontal">
        <div class="box-body">
           	确定要删除<span ng-bind="dish_name"></span>吗？
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default btn-lg pull-left" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-success btn-lg" ng-click="delDish_true(dish_id);">确定</button>
      </div>
    </div>
  </div>
</div>




      
      
      
<style>
	.space{
		padding-left:2px;
		padding-right:2px;
	}
	.box{
		border-top:1px solid #d2d6de;
	}
	.pagination{
		margin:0;
	}
	.odd{background-color: #f9f9f9 !important;}
	.even{background-color: #ffffff !important;}
	/*.btn{    padding: 10px 12px;}*/
	.row1{    display: flex;margin-bottom: -1px;border: 1px solid #ddd;align-items: center;
   			 height: 45px;padding-left: 12px;padding-right: 12px;background-color: #fff;}
	.row1 > label {  flex: 0 0 84px;text-align: right;padding-right: 12px;}
	.row1 textarea { flex: auto;border: none;outline: none;}
	textarea { padding: 10px 10px;resize: none;}
	.row1 select { flex: auto; border: none; outline: none;}
	.row1 select { padding-left: 5px;}
	.row1 input { flex: auto; border: none; outline: none;    padding-left: 10px;}
	.goods{    height: 30px;margin: 6px 10%;line-height: 20px;padding: 5px;width: 80%;border: 1px solid #ccc;border-radius: 3px;}
	.primary-color { color: #37C8D2;}
	.b_header{width: 24%;height: 20px;line-height: 40px;text-align: center;display: inline-block;}
	.maDataList_div_input{height: 28px; width: 90%;  margin-left: 20px;}
</style>
<script>
					$(document).ready(function() {
							
//							$('#table_example').hide();
  							//$('#example').dataTable();
					} );
					
				
	
</script>